package com.sinosun.autotestmachine;

import java.io.File;

import com.sinosun.autotestmachine.tools.parser.ContentMaker;

/**
 * 选择文件列表的子元素
 * @author HYW
 *
 */
public class FileElement {
	public boolean back = false;
	private boolean checked;
	private String fileName;
	private boolean isFile;
	private String filePath;
	
	public FileElement(String path) {
		checked = false;
		filePath = path;
		fileName = ContentMaker.getFileName(filePath);
		File file = new File(filePath);
		if(file.isDirectory()) {
			isFile = false;
		} else {
			isFile = true;
		}
	}
	
	public boolean getChecked() {
		return checked;
	}
	
	public void setChecked(boolean checked) {
		this.checked = checked;
	}
	
	public String getFileName() {
		return this.fileName;
	}
	
	public String getFilePath() {
		return this.filePath;
	}
	
	public void setFilePath(String filePath) {
		this.filePath = filePath;
	}
	
	public boolean IsFile() {
		return this.isFile;
	}
}
